<?php
	$ScriptVal =	"<link rel='stylesheet' href='js/val/val.css' />
					<script type='text/javascript' src='js/val/jquery-1.4.4.min.js'></script>
					<script type='text/javascript' src='js/val/jquery.validate.js'></script>
					<script type='text/javascript'>
					$(document).ready(function() {
						$('#identitasForm').validate({});
					})
					</script>
					";

	$ScriptDatepicker = 	"
							<link rel='stylesheet' href='js/date/development-bundle/themes/base/jquery.ui.all.css' />
							<script src='js/date/development-bundle/ui/jquery.ui.core.js'></script>
							<script src='js/date/development-bundle/ui/jquery.ui.widget.js'></script>
							<script src='js/date/development-bundle/ui/jquery.ui.datepicker.js'></script>
							<script type='text/javascript' src='js/date/js/jquery.ui.datepicker.validation.js'></script>
							";
	$ScriptTanggal = 	"
						<script>
						jQuery(document).ready(function(){
							// binds form submission and fields to the validation engine
							$( '.datepicker' ).datepicker();
						});
						</script>
						";
						
		if(ISSET($_GET['Content']))		
		{
			// content untuk Home 
			if ($_GET['Content'] == "")
				{
					
				}
			
			// content untuk Home 
			if ($_GET['Content'] == "Home")
				{
					
				}
				
			// content Form Surat Cuti Reguler
			if ($_GET['Content'] == "SuratCutiReguler")
				{
					echo "$ScriptVal";
					echo "$ScriptDatepicker";
					for ($i=1;$i<=$JumlahCutiDatePickier;$i++)
					{
					echo "	<script>
							jQuery(document).ready(function(){
							// binds form submission and fields to the validation engine
							$( '.datepicker$i' ).datepicker({
							minDate: -(-4),
							beforeShowDay: $.datepicker.noWeekends
							});
							});
							</script>";
					}		
				}
			
			// content Surat Cuti Saya
			if ($_GET['Content'] == "SuratCutiSaya")
				{
					echo 	"
							<script type='text/javascript'>  
							function saveForm()
							{  
							if(document.getElementById('Tahun').value == '')
							{  
							 alert('Tahun tidak boleh kosong');  
							 document.getElementById('Tahun').focus();  
							 return false;  
							}  
							document.getElementById('FormPencarianSuratCutiSaya').submit();  
							}  
							</script> 
							";		
				}
				
			// content Pengesahan surat
			if ($_GET['Content'] == "PengesahanSurat")
				{
								
				}
			
			// content Cuti Bersama
			if ($_GET['Content'] == "CutiBersama" && $_SESSION['Level'] == "HRD")
				{
						
				}
					
			// content Form Cuti Bersama
			if ($_GET['Content'] == "FormCutiBersama" && $_SESSION['Level'] == "HRD")
				{
					echo "$ScriptVal";
					echo "$ScriptDatepicker";
					for ($i=1;$i<=$JumlahCutiDatePickier;$i++)
					{
					echo "	<script>
							jQuery(document).ready(function(){
							// binds form submission and fields to the validation engine
							$( '.datepicker$i' ).datepicker();
							});
							</script>";
					}		
				}
			
			// content Penolakan cuti bersama
			if ($_GET['Content'] == "PenolakanCutiBersama" && $_SESSION['Level'] == "HRD")
				{
					
				}
			
			// content Form Penolakan Cuti Bersama
			if ($_GET['Content'] == "FormPenolakanCutiBersama" && $_SESSION['Level'] == "HRD")
				{
					echo "$ScriptVal";
					echo "$ScriptDatepicker";
					for ($i=1;$i<=$JumlahCutiDatePickier;$i++)
					{
					echo "	<script>
							jQuery(document).ready(function(){
							// binds form submission and fields to the validation engine
							$( '.datepicker$i' ).datepicker();
							});
							</script>";
					}		
				}
			
			// content Cuti khusus
			if ($_GET['Content'] == "CutiKhusus" && $_SESSION['Level'] == "HRD")
				{
					
				}
			
			// content Form cuti khusus
			if ($_GET['Content'] == "FormCutiKhusus" && $_SESSION['Level'] == "HRD")
				{
					echo "$ScriptVal";
					echo "$ScriptDatepicker";
					for ($i=1;$i<=$JumlahCutiDatePickier;$i++)
					{
					echo "	<script>
							jQuery(document).ready(function(){
							// binds form submission and fields to the validation engine
							$( '.datepicker$i' ).datepicker();
							});
							</script>";
					}		
				}
			
			// content Data Karyawan
			if ($_GET['Content'] == "DataKaryawan")
				{
					
				}
				
			// content Data Karyawan
			if ($_GET['Content'] == "InputKaryawan")
				{
					echo "$ScriptVal";
					echo "$ScriptDatepicker";
					echo "$ScriptTanggal";
				}
			
			// content Edit data karyawan
			if ($_GET['Content'] == "EditDataKaryawan" )
				{
					
				}
			
			// content Surat cuti
			if ($_GET['Content'] == "SuratCuti" && $_SESSION['Level'] == "HRD")
				{
					echo 	"
							<script type='text/javascript'>  
							function saveForm()
							{  
							if(document.getElementById('Tlc').value == '')
							{  
							 alert('Tlc tidak boleh kosong');  
							 document.getElementById('Tlc').focus();  
							 return false;  
							} 
							if(document.getElementById('Tahun').value == '')
							{  
							 alert('Tahun tidak boleh kosong');  
							 document.getElementById('Tahun').focus();  
							 return false;  
							}
							document.getElementById('FormPencarianSuratCuti').submit();  
							}  
							</script> 
							";		
				}
				
			// content unutuk melihat surat
			if ($_GET['Content'] == "LihatSurat")
				{
					
				}	
			
			// content unutuk edit surat 1
			if ($_GET['Content'] == "EditSurat")
				{
					
				}
			
			// content unutuk edit surat 2
			if ($_GET['Content'] == "EditSurat2")
				{
					echo "$ScriptVal";
					echo "$ScriptDatepicker";
					$JumlahCuti = count($_POST['KetTgl']);
					for ($i=1;$i<=$JumlahCuti;$i++)
					{
					echo "<script type='text/javascript'> 
							$(document).ready
							(function(){
							$('#Hari$i').datepicker
							({
							  showAnim    : 'drop',
							  showOptions : { direction: 'up' }
							});
							});
							</script>";
					}		
				}
			
			// content unutuk Setting
			if ($_GET['Content'] == "Setting")
				{
					
							echo "$ScriptVal";
							
				}
		}
?>